<!doctype html>
<html xmlns:th="http://www.w3.org/1999/xhtml">

<head>
	<th:block th:include="/A0723/include :: header('个人信息')" />
</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">个人信息</h1>
		</header>
		<div class="mui-content">
			<div class="forget_from">
				<div class="mui-input-row">
					<label>手机号：</label>
					<div id="phone"></div>
				</div>
				<div class="mui-input-row">
					<label>状态：</label>
					<div id="state"></div>
				</div>
				<div class="mui-input-row">
					<label>会员级别：</label>
					<div id="levelName"></div>
					<a style="margin-left: 10%;color: #007aff" href='toPackageLevels'>升级</a>
				</div>
				<div class="mui-input-row">
					<label>余额：</label>
					<div id="balance"></div>
					<a style="margin-left: 10%;color: #007aff" href='toWithdraw'>提现</a>
				</div>
				<div class="mui-input-row">
					<label>冻结余额：</label>
					<div id="freezeBalance"></div>
				</div>
				<div class="mui-input-row" id="push">
					<label>推荐人数：</label>
					<div id="pushNum"></div>

				</div>
				<div class="mui-input-row">
					<label>团队人数：</label>
					<div id="teamNum"></div>
				</div>
				<div class="mui-input-row">
					<label>注册时间：</label>
					<div id="createTime"></div>
				</div>


			</div>

		</div>
		<th:block th:include="/A0723/include :: footer" />
		<script type="text/javascript">
			$(function () {
				getAppUser()
			})
			function getAppUser(){
				mui.ajax(ctx+'front/getAppUser', {
					dataType: 'json',//服务器返回json格式数据
					type: 'get',//HTTP请求类型
					timeout: 10000,//超时时间设置为10秒；
					headers: {'Content-Type': 'application/json'},
					success: function (res) {
						$('#freezeBalance').text(res.data.freezeBalance)
						$('#balance').text(res.data.balance)
						$('#phone').text(res.data.phone)
						$('#levelName').text(res.data.packageLevel.name)
						$('#state').text(res.data.state==1?'正常':'封号')
						$('#pushNum').text(res.data.pushNum+"人")
						$('#push').append("<a style='margin-left: 10%;color: #007aff' href='release/toRegister?referralCode="+res.data.referralCode+"'>注册新会员</a>")
						$('#teamNum').text(res.data.teamNum+"人")
						$('#createTime').text(res.data.createTime)
					},
					error: function (xhr, type, errorThrown) {
						//异常处理；
						console.log(type);
					}
				});
			}
		</script>
	</body>

</html>
